how to use socket function in c